<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE>
<html lang="zh-CN">
<% 
String path = request.getContextPath(); 
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<base href="<%=basePath%>">
<title>manage</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/style1.css" rel="stylesheet">
<style> 
        .black_overlay{ 
            display: none; 
            position: absolute; 
            top: 0%; 
            left: 0%; 
            width: 100%; 
            height: 100%; 
            background-color: black; 
            z-index:1001; 
            -moz-opacity: 0.8; 
            opacity:.80; 
            filter: alpha(opacity=88); 
        } 
        .white_content { 
            display: none; 
            position: absolute; 
            top: 25%; 
            left: 25%; 
            width: 55%; 
            height: 55%; 
            padding: 20px; 
            border: 10px solid orange; 
            background-color: white; 
            z-index:1002; 
            overflow: auto; 
            text-align: center;
        }
        .notice{
        	display:block;
        	position:absolute;
        	top:30%;
        	left:30%;
        	width:30%;
        	height:30%;
        	padding:50px;
        	border:10px solid orange;
        	background-color:white;
        	z-index:1002;
        	overflow:auto;
        	text-align: center;
        }
        .notice_overlay{ 
            display: block; 
            position: absolute; 
            top: 0%; 
            left: 0%; 
            width: 100%; 
            height: 100%; 
            background-color: black; 
            z-index:1001; 
            -moz-opacity: 0.8; 
            opacity:.80; 
            filter: alpha(opacity=88); 
        } 
</style>
</head>
<body>
<div class="container-fluid">
<div class="col-md-12">
<div class="row">
<div class="col-md-3">
<br>
<a href="javascript:void(0)" class="btn btn-primary btn-large"onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">新增/修改单本</a>
</div>
<div class="col-md-3">
<br>
<a href="javascript:void(0)" class="btn btn-primary btn-large"onclick = "document.getElementById('more').style.display='block';document.getElementById('fade').style.display='block'">批量入库</a>
</div>
<div class="col-md-3">
<br>
<a href="javascript:void(0)" class="btn btn-primary btn-large"onclick = "document.getElementById('dele').style.display='block';document.getElementById('fade').style.display='block'">删除图书</a>
</div>
<div class="col-md-3">
<br>
<a href="javascript:void(0)" class="btn btn-primary btn-large"onclick = "document.getElementById('reco').style.display='block';document.getElementById('fade').style.display='block'">管理借书证</a>
</div>
<br>
<button type="button" class="btn btn-link" onclick="window.location.href='index.jsp';">
退出
</button>
</div>
</div>
</div>
<c:if test="${sessionScope.operate_state==1 }">
<div id="n_fade" class="notice_overlay">
<div id="operation" class="notice">
<p>操作成功！</p>
<a href = "javascript:void(0)" onclick = "document.getElementById('operation').style.display='none';document.getElementById('n_fade').style.display='none'">
<button type="button">确定</button>
</a>
</div>
</div>
</c:if>
<c:if test="${sessionScope.operate_state==0 }">
<div id="n_fade" class="notice_overlay">
<div id="operation" class="notice">
<p>操作失败！</p>
<a href = "javascript:void(0)" onclick = "document.getElementById('operation').style.display='none';document.getElementById('n_fade').style.display='none'">
<button type="button">确定</button>
</a>
</div>
</div>
</c:if>
<div class="black_overlay" id="fade">
<div id="light" class="white_content">
<form action="update" method="post">
<input name="bno" type="text" placeholder="图书编号">
<input name="category" type="text" placeholder="类别">
<input name="title" type="text" placeholder="书名">
<input name="publish" type="text" placeholder="出版商">
<input name="year" type="text" placeholder="出版年份">
<input name="author" type="text" placeholder="作者">
<input name="price" type="text" placeholder="价格">
<input name="total" type="text" placeholder="总量">
<input name="stock" type="text" placeholder="库存">
<button type="submit">确认</button>
</form>
<a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'">
<button type="button">取消</button>
</a>
</div> 

<div id="more" class="white_content">
<form action="update" method="post">
<input name="txt" type="text" placeholder="输入文件名">
<button type="submit">确认</button>
</form>
<a href = "javascript:void(0)" onclick = "document.getElementById('more').style.display='none';document.getElementById('fade').style.display='none'">
<button type="button">取消</button>
</a>
</div>

<div id="dele" class="white_content">
<form action="delete" method="post">
<input name="bno" type="text" placeholder="图书编号">
<button type="submit">确认</button>
</form>
<a href = "javascript:void(0)" onclick = "document.getElementById('dele').style.display='none';document.getElementById('fade').style.display='none'">
<button type="button">取消</button>
</a>
</div>

<div id="reco" class="white_content">
<form action="recorddrop" method="post">
<input name="uid" type="text" placeholder="图书证号">
<input name="ustatus" type="text" placeholder="身份(选填)">
<button type="submit" value="1" name="alter_reco">新增</button>
<button type="submit" value="0" name="alter_reco">删除</button>
</form>
<a href = "javascript:void(0)" onclick = "document.getElementById('dele').style.display='none';document.getElementById('fade').style.display='none'">
<button type="button">取消</button>
</a>
</div>
</div>
</body>
</html>